rise to the occasion

Show unexpected skill in dealing with a difficulty that arises, as in The leading man broke his leg in the first act but his understudy rose to the occasion and was rewarded with excellent reviews. [ Mid-1800s ]